<template>
  <!-- 审批人 -->
  <div class="approval-content">
    <div class="header"> 审批人 </div>
    <div class="content">
      <a-alert class="a-alert">
        <div class="alert-item">1、请至少选择一个审批人</div>
        <div class="alert-item">2、提交审批后，无法修改审批人</div>
      </a-alert>
      <div class="select-content">
        <a-timeline>
          <a-timeline-item v-for="(item, index) in form.checkFlowList" :key="index">
            <div class="step-wrap">{{ item.postName }} </div>
            <div class="select-wrap">
              <i-input v-if="form.id && !routeQuery.type" disabled v-model="item.staffName" />
              <remote-select
                v-else
                v-model="item.staffId"
                type="operate_staff_change"
                :params="{
                  staffPost: item.post,
                  status: 1,
                }"
              />
            </div>
          </a-timeline-item>
        </a-timeline>
      </div>
    </div>
  </div>
</template>
<script setup>
  import { inject } from 'vue'
  import { useRoute } from 'vue-router'

  const route = useRoute()
  const routeQuery = route.query

  const form = inject('form')
</script>
<style lang="less" scoped>
  .approval-content {
    position: fixed;
    top: 130px;
    right: 40px;
    background: #ffffff;
    min-width: 420px;
    margin-left: 20px;
    border: 1px solid #e5e6eb;
    height: 70%;
    overflow: hidden;
    .header {
      font-weight: 600;
      font-size: 14px;
      color: #1d2129;
      height: 40px;
      line-height: 40px;
      background: #f2f3f5;
      padding: 0 20px;
    }
    .content {
      padding: 20px;
      height: calc(100% - 40px);
      overflow: auto;
    }
    .select-content {
      padding-bottom: 200px;
    }
    .select-wrap {
      margin-top: 3px;
    }
  }
</style>
